﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;

namespace GSdk.MediaJukeboxPlugin
{
    /// <summary>
    /// Logica di interazione per App.xaml
    /// </summary>
    public partial class App : Application
    {
        internal static MediaJukeboxApplet Applet;
        protected override void OnStartup(StartupEventArgs e)
        {
            Current.Exit += new ExitEventHandler(Current_Exit);
            Applet = new MediaJukeboxApplet();
        }

        void Current_Exit(object sender, ExitEventArgs e)
        {
            Applet.Dispose();
        }

        public static void Restart()
        {
            System.Diagnostics.Process.Start(Application.ResourceAssembly.Location);
            Application.Current.Shutdown();
        }
    }
}
